VideoHelp Forum



Support our site by donate $5 directly to us Thanks!!!

Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 6 of 6
  1. Member G.T.X.R's Avatar
    Join Date
    Jan 2025
    Location
    Europe
    Search Comp PM
    I started studying drm, for viewing raiplay videos on external players offline; it's been a month now.

    I have been testing WidevineProxy2 v0.8.2 extension (ff and chrome) but not work at windows7 (10+ only). Widevine L3 Guesser Extension and derivate software ok for windows7 because of Manifest v2, but not allow insertion of custom pssh. I don't know python/ js so still can't use py scripts directly.

    Than i wrote this batch script for educational purposes that retrieve quickly the most relevant headers for CDRM-Project or Get Widevine Keys site, and show other data. Also reveal if there is fullhd stream available or not, and subtitles. It works, but maybe someone can optimize the script or give an idea on how to improve it.

    Dependencies are sed.exe (libiconv2.dll, libintl3.dll, regex2.dll too), wget.exe and N_m3u8DL-RE.exe in the "Tvtools" directory on %SystemDrive%.

    N_m3u8DL-RE need ffmpeg.exe, mp4decrypt.exe also.

    ° wget (tested with .exe x64 for windows7 vers: 1.21.4) link

    ° sed (tested with .exe for windows7 vers: 4.2.1) link

    ° N_m3u8DL-RE (tested with .exe x64 for windows7 vers: 0.3.0-beta) link

    ° ffmpeg (tested with .exe x64 vers: 2025-03-03 from ffmpeg-2025-03-03-git-d21ed2298e-essentials_build.7z) link

    ° mp4decrypt (tested with .exe x64 vers: Bento4-SDK-1-6-0-641) link

    Setup: Open notepad or any text editor and copy-paste this script, save as UTF-8 command file (with or without BOM). Create 3 versions with following names: "_Nv.auth.Vers2.2.3-1-challenge.cmd", "_Nv.auth.Vers2.2.3-2-record.cmd" and "_Nv.auth.Vers2.2.3-3-info-only.cmd". That's all. Set main switches within them to change the way these programs work.

    Inside "_*-1-challenge.cmd", set: recording=off, challenge=on, raw=off, textinfo=on.
    Inside "_*-2-record.cmd", set: recording=on challenge=off raw=on textinfo=off.
    Inside "_*-3-info-only.cmd", set: recording=off challenge=off raw=on textinfo=on.

    There are many other optional switches (audio, path etc), you can explore them on your own.

    Features: For those who still use Windows 7, for those who can't get Android emulator working, and need to send custom pssh to server. This script simplifies and speeds up the procedure with drm for standard and hidden pssh. Also usefull for m3u8 VOD, just put the bookmark of web page in the folder and click cmd (script); or drag saved bookmark over the cmd (script) - the download starts immediately. With "_*info-only.cmd" you will be able to view technical and artistic data for video content.

    Usage: If m3u8 (no drm), put in the same folder the bookmark (*.url) of web page raiplay where video content is present and click "_*record.cmd". Or drag saved bookmark over "_*record.cmd". Extremely simple. For viewing data only, use "_*info-only.cmd" instead of "_*record.cmd".

    If mpd (drm), put in the same folder the bookmark (*.url) of web page raiplay where video content is present and click "_*challenge.cmd" or drag saved bookmark over "_*challenge.cmd". this will open your chosen web server "Get Widevine Keys" or "CDRM-Project" and will open the text file showing the headers; it is also opened "_source.txt" where you have to paste key found successfully by the server. Then close all open windows and click "_*record.cmd" or drag saved bookmark over "_*record.cmd".

    Tips: Firefox, some versions, blocks creating bookmarks via drag-and-drop method but you can edit about:config> "browser.launcherProcess.enabled" from "true" to "false" and bypass a limit. Chrome doesn't have this problem.

    To quickly close the text file (and save its contents), web pages, media players... you can install "autohotkey" and write a short script *.ahk that assigns some rarely used keyboard keys to functions as open or close windows or specific software. You can program the Insert key to close all active windows in the foreground, one each time the key is pressed. This helps a lot. For example this will allow notepad to be closed by pressing "insert" (INS) on the keyboard:

    Code:
    #IfWinActive, ahk_class Notepad
    Ins::WinClose, ahk_class Notepad
    How that work: these scripts are looking for best video resolution, known and hidden, best audio (or all audio tracks depends on switches set within the script) and all subtitles. If there is no drm (.m3u8) than 2° (recording) script show some data in the default text editor, data that can be hidden if not needed, and automatically start downloading; at the end a directory where video is saved and muxed (default: %SystemDrive%\TV) is opened. Otherwise if there is drm (.mpd) the first script (challenge) show valid headers in the default text editor and some data that must be inserted into CDRM-Project or Get Widevine Keys site to get key xxxx : xxxx. This key have to be inserted (copy-paste) into a blank textfile named "_source.txt", prepared and opened by the main (1°) script. After the key has been stored, when click recording (2°) script this takes into account the web address where the video is located which he takes from the bookmark, and the decryption key which he takes from "_source.txt". Mpd is generated from script, you don't need to know it. The bookmark is enough.

    If subtitles is present but not compatible, N_m3u8DL-RE may not detect them or it could detect but fails to save together, and mux them. For this reason subtitles are saved even separately (*.srt format).

    Options: To be able to choose video resolution if no need 1080p, audio quality or language etc apart from the provided switches you can edit the script by yourself (-sv best means best video resolution, -sv res=1600* means 1600x900p stream, -sv res=1440* means 1440x810p stream, -sv res=1280* means 1280x720p stream, -sa lang=Italiano:for=best means italian language, -sa lang=VO:for=best or -sa lang=und:for=best should mean "Versione Originale", original audio version, and -sa all means all available audio tracks muxed.) Sometimes 1600x900p and 1440x810p, are marked as "equal". This is case sensitive:

    "-sa lang=it:for=best" or "-sa lang=italiano:for=best", it might not work.

    "-sa lang=it*:for=best" or "-sa lang=Italiano:for=best", it might work.

    Use this tool only for educational purposes and for watching VOD offline if you have rights to watch content, and download only if you have rights to download it.

    If it doesn't work on some pages it's probably a technical error on the page itself, or this is obsolete, you can write url in pm so I can check. If you have trouble with some UNICODE/ UTF characters in the titles, description of shows, actors, directory names explain the problem and mention the country or default language of your computer/ device so i can reproduce the situation and try to resolve it.

    *Note 1: when i say drag bookmark over one of three cmd's, this means that you must drag and drop over the "cmd" (closed) symbol in the folder, not over an already open cmd. You don't need to open it (click). If not, the other method is to open it (click) without dragging - either one or the other, not both. ^___^

    *Note 2: This is for raiplay only, need italian ip/ proxy and free account.
    Once you have m3u8 or mpd and key, download is possible also without italian ip. In that case, use the usual syntax N_m3u8DL-RE -M mp4 --key xxxx mpd -sv best -sa all -ss all --save-name title --check-segments-count false.

    Bookmarks must be originally formatted without modifications, not renamed! The simplest way to generate bookmark in the desired folder is: drag padlock symbol on your browser near "https" to folder where script is. Only one bookmark is processed, so remove others, or move them into "a-d-d-r-e-s-s" folder. If you are watching tv series example *S1-E1*, *S1-E2* the script will process last bookmark alphabetically, no need remove old below a number 10.

    If you set the switch "raw"=on, raw data (json, xml, m3u8, mpd) will be created in the i-n-f-o directory for statistical/ analytic purposes.

    Code:
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@★
    @echo off&& cd /D "%~dp0"&& chcp 1252&& cls
      title=  - - s e a r c h n v a u t h - - G.T.X.R. Vers: 2.2.3
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@★
    rem SWITCH: {toggle} recording on or off
    set "recording=on"
    
    rem SWITCH: {toggle} search keys online on or off
    set "challenge=off"
    
    rem SWITCH: {toggle} create RAW info data on or off
    set "raw=on"
    
    rem SWITCH: {toggle} show textinfo on or off
    set "textinfo=on"
    
    rem SWITCH: {toggle} pause before exit on or off
    set "pause=on"
    
    rem SWITCH: {toggle} server 'Get Widevine Keys' or 'CDRM-Project'
    set "server=Get Widevine Keys"
    
    rem SWITCH: {toggle} debug mode on or off
    set "debug=off"
    
    :: ============================================== ::
    :: :: Choose Your default audio |Language|: ::::: ::
    :: ::::::: (Italiano¦VO¦und¦Audiodescrizione):::: ::
    
        set "Language=Italiano"
    rem set "Language=VO"
    rem set "Language=Audiodescrizione"
    rem set "Language=und"
    :: ============================================== ::
    :: ============================================== ::
    :: :: Choose |Audio| tracks, if Multiaudio: ::::: ::
    
    rem set "Track=BEST"
    rem set "Track=1"
        set "Track=ALL"
    :: ============================================== ::
    :: ============================================== ::
    :: :::::::::::: Choose Video save directory: :::: ::
    set "direct=%systemDrive%\TV"
    
    if not exist "%direct%" mkdir "%direct%"
    :: ============================================== ::
    :: ============================================== ::
    :: :::::: Choose |Software directory|: :::::::::: ::
    set "sw.TV=%systemdrive%\Tvtools"
    
    if not exist "%sw.TV%" mkdir "%sw.TV%"
    :: ============================================== ::
    
    SETLOCAL ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
    echo.:: ========================================================== ::
    echo.  - - s e a r c h  n v  a u t h - Vers: 2.2.3 .m3u8 + .mpd - -
    echo.:: ========================================================== ::
    
    if not exist ".\a-d-d-r-e-s-s" mkdir ".\a-d-d-r-e-s-s"
    
    if exist "*- RaiPlay.url" ( for /f "tokens=1,2,3 delims=:" %%i IN ('findstr /B /I "URL" "*- RaiPlay.url"') do ( set url=%%j:%%k ) )
    
    if not "%url%"=="" ( set url=%url:~4% )
    
    if not exist "_source.txt" echo.> "_source.txt"
    %sw.TV%\sed "/^$/d" "_source.txt" > "source-0.txt"
    move "source-0.txt" "_source.txt">nul
    
    if exist "_source.txt" ( (FOR /L %%W IN (1,1,1) DO SET /P "line-1=") < "_source.txt" )
    
    set "key=%line-1%"
    if not "%url%"=="" (goto data)
    
    echo.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\ if missing data: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\ insert decryption KEY from 'Get Widevine Keys' or \\\\\\\\\
    echo.\\\\\\\ 'CDRM-Project' site to line 1 of "_source.txt".    \\\\\\\\\
    echo.\\\\\\\                                                   \\\\\\\\\
    echo.\\\\\\\  put in this folder bookmark of page "raiplay.it" \\\\\\\\\
    echo.\\\\\\\ (*.url) where VIDEO content is present.           \\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    
    pause
    exit
    :data
    
    if "%server%"=="Get Widevine Keys" ( set "servst=http://108.181.133.95:8080/" )
    if "%server%"=="CDRM-Project" ( set "servst=https://cdrm-project.com/" )
    
    if "%challenge%"== "on" (
    
    if "%recording%"=="off" ( if exist "_source.txt" start "" "_source.txt" )
    if "%recording%"=="off" ( start "" "%servst%" )
    
     )
    set "REF=https://www.raiplay.it"
    set "Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0"
    
    rem ::IT= 151.81.0.0 151.100.255.255::
    rem :: : ::::r a n d o m  i p:::: : ::
    set maxval1=151
    set minval1=151
    
    set maxval2=100
    set minval2=81
    
    set maxval3=255
    set minval3=0
    
    set maxval4=255
    set minval4=0
    
     SET /A N0=%RANDOM% * 255 / 32768
    
     SET /A N1=%RANDOM% * ^(%maxval1% - %minval1% + 1^) / 32768 + %minval1%
    
     SET /A N2=%RANDOM% * ^(%maxval2% - %minval2% + 1^) / 32768 + %minval2%
    
     SET /A N3=%RANDOM% * ^(%maxval3% - %minval3% + 1^) / 32768 + %minval3%
    
     SET /A N4=%RANDOM% * ^(%maxval4% - %minval4% + 1^) / 32768 + %minval4%
    
    SET  "IP=%N1%.%N2%.%N3%.%N4%"
    
    if "%Track%"=="BEST" ( set "Audio=best" )
    if "%Track%"=="1" ( set "Audio=lang=%Language%:for=best" )
    if "%Track%"=="ALL" ( set "Audio=all" )
    
    if exist ".\*.log" del /F /Q ".\*.log"
    
    echo.%url%| %sw.TV%\sed "s/\(https:\/\/www.raiplay.it\/video\/.*\)\.html/\1.json/gi; " > "b.log"
    
    for /f "usebackq tokens=* delims=*" %%F in ("b.log") do ( %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --referer=%REF% --header="X-Forwarded-For:%IP%" %%F -q -O "c.log" )
    
    %sw.TV%\sed "s/\x22, \x22/\x22, \n \x22/gi; " "c.log" > "d.log"
    
    %sw.TV%\sed "s/,/,\n/g;" "d.log" >> "p-x.log"
    
    %sw.TV%\sed "/[a-zA-Z]\.srt/!d; s/\"url\":\"\(\/dl\/video\/stl\/[a-z_0-9A-ZÈàèéìòùËëÇçÑñ].*\.srt\)\".*/https:\/\/www.raiplay.it\1/gi; " "p-x.log" | %sw.TV%\sed -nr "G;/^([^\n]+\n)([^\n]+\n)*\1/!{P;h}; " > "p.log"
    
    %sw.TV%\sed "/eeqqEEqual/!d; " "d.log" > "e.log"
    
    %sw.TV%\sed "s/\s.video.:\s{\s\s.content_url.:\s.\(https:\/\/mediapolisvod\.rai\.it\/relinker\/relinkerServlet\.htm?cont=.*eeqqEEqual\).*$/\1/gi; " "e.log" > "f.log"
    
    for /f "usebackq tokens=* delims=*" %%X in ("f.log") do ( set "XML=%%X^&forceUserAgent=mpd-5000^&output=64" )
    
    
    if "%XML%"=="" (goto next)
    
    %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --header="X-Forwarded-For:%IP%" %XML% -q -O "g.log"
    
    %sw.TV%\sed "/Authorization=/!d; " "g.log" > "h.log"
    
    %sw.TV%\sed "s/.*Authorization=\(ey.*\)\",\"name.*/{\"Nv-Authorizations\": \"\1\"}\n\nurl license:\n-------------\nhttps:\/\/rai6nb5f.anycast.nagra.com\/RAI6NB5F\/wvls\/contentlicenseservice\/v1\/licenses/gi; " "h.log" > "i.log"
    
    %sw.TV%\sed "/<!\[CDATA\[https/!d; /vtt_poster/d; " "g.log" > "j.log"
    
    %sw.TV%\sed "s/.*<!\[CDATA\[\(https.*\)\]\]>/\1/gi; " "j.log" > "k.log"
    
    
    for /f "usebackq tokens=* delims=*" %%M in ("k.log") do ( set "mpd=%%M" )
    
    if "%mpd%"=="https://download-rai-it.akamaized.net/video_no_available.mp4" (
    
    echo.>> "i.log"
    echo.//// Video unknown type //// - - -:>> "i.log"
    echo.------------------------------------------>> "i.log"
    echo.This script need italian ip or proxy but download from known m3u8 and mpd not.>> "i.log"
    
    goto ip
    
     )
    set "mpd_=%mpd:&=^^^&%"
    
    %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --header="X-Forwarded-For:%IP%" "%mpd%" -q -O "l.log"
    
    echo.0000> "q.log"
    
        find /c "1200" "k.log" >NUL
        if %errorlevel% equ 0 echo.522p,432p> "q.log"
    
        find /c "1800" "k.log" >NUL
        if %errorlevel% equ 0 echo.576p> "q.log"
    
        find /c "2400" "k.log" >NUL || find /c ",2401" "k.log" >NUL
        if %errorlevel% equ 0 echo.720p> "q.log"
    
        find /c "3600" "k.log" >NUL
        if %errorlevel% equ 0 echo.900p,810p> "q.log"
    
        find /c "5000" "k.log" >NUL
        if %errorlevel% equ 0 echo.1080p> "q.log"
    
    for /f "usebackq tokens=* delims=*" %%R in ("q.log") do ( set "res=%%R" )
    
    if "%res%"=="0000" (
        find /c "RESOLUTION" "l.log" >NUL
        if %errorlevel% equ 0 echo.[random res]> "q.log"
    )
    
    for /f "usebackq tokens=* delims=*" %%R in ("q.log") do ( set "res=%%R" )
    
    
    %sw.TV%\sed "/<cenc:pssh>/!d; " "l.log" > "m.log"
    
    %sw.TV%\sed "s/.*<cenc:pssh>\(AAAA.*\)<\/cenc:pssh>.*/\1/; " "m.log" > "n.log"
    
    %sw.TV%\sed -e "2,$d" "n.log" > "o.log"
    
    :next
    
    
    for /f "usebackq tokens=* delims=*" %%A in ("o.log") do ( set "AAAA=%%A" )
    
    echo.%AAAA% | findstr /C:"AAA">nul && ( echo.>nul ) || ( echo.Nv-Authorizations: no need, license: no need {= n  o   d  r  m =}> "o.log" )
    
    for /f "usebackq tokens=* delims=*" %%E in ("e.log") do ( set "EXP=%%E" )
    
    echo.%EXP% | findstr /I /C:"url">nul && ( echo.>nul ) || ( echo. j s o n   m i s s i n g> "o.log" )
    
    for /f "usebackq tokens=* delims=*" %%P in ("o.log") do ( set "pssh=%%P" )
    
    echo.>> "i.log"
    echo.pssh %res%:>> "i.log"
    echo.-------------->> "i.log"
    echo.%pssh%>> "i.log"
    
    echo.%mpd_%| findstr /I /C:".m3u8">nul && ( set "type=m3u8" ) || ( set "type=mpd" )
    
    echo.%EXP%| findstr /I /C:"url">nul && ( echo.>nul ) || ( set "type=m3u8 / mpd" && set "space= " )
    
    echo.>> "i.log"
    echo.%type% %res%:>> "i.log"
    echo.-------------->> "i.log"
    echo.%mpd_%>> "i.log"
    
    :ip
    
    for /f "usebackq tokens=* delims=*" %%U in ("p.log") do ( set "subt=%%U" )
    if "%subt%"=="" ( echo. n o  s u b t i t l e s> "p.log" ) ELSE ( echo.>nul )
    
    echo.>> "i.log"
    echo.subtitles%space%:>> "i.log"
    echo.-------------->> "i.log"
    for /f "usebackq tokens=* delims=*" %%C in ("p.log") do ( echo.%%C>> "i.log" )
    
    
    if "%XML%"=="" (goto end)
    
    %sw.TV%\sed "/.*{.*}.*/d; s/\&/+/g; /^.\"name\":.\".*\",.$/!d; " "d.log" > "q2.log"
    %sw.TV%\sed -e "2,$d" "q2.log" > "q3.log"
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"name\":.\"\(.*\)\",.$/\1/gi; " "q3.log" > "q4.log"
    
    for /f "usebackq tokens=* delims=*" %%T in ("q4.log") do ( set "title-1=%%T" )
    
    %sw.TV%\sed "s/\&/+/g; /^.\"toptitle\":.\".*\",.$/!d; " "d.log" > "r2.log"
    %sw.TV%\sed -e "2,$d" "r2.log" > "r3.log"
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"toptitle\":.\"\(.*\)\",.$/\1/gi; " "r3.log" > "r4.log"
    
    for /f "usebackq tokens=* delims=*" %%Q in ("r4.log") do ( set "title-3=%%Q" )
    
    %sw.TV%\sed "/.*{.*}.*/d; s/\&/+/g; /^.\"subtitle\":.\".*\",.$/!d; " "d.log" > "s2.log"
    %sw.TV%\sed -e "2,$d" "s2.log" > "s3.log"
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"subtitle\":.\"\(.*\)\",.$/\1/gi; " "s3.log" > "s4.log"
    
    for /f "usebackq tokens=* delims=*" %%D in ("s4.log") do ( set "title-4=%%D" )
    
    
    %sw.TV%\sed "s/\&/+/g; /^.\"description\" :.\".*\",.$/!d; " "d.log" >> "t2.log"
    
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"description\" :.\"\(.*\)\",.$/\1/gi; " "t2.log" > "t4.log"
    
    for /f "usebackq tokens=* delims=*" %%L in ("t4.log") do ( set "desc-L=%%L" )
    
    %sw.TV%\sed "s/\&/+/g; /^.\"description\":.\".*\",.$/!d; " "d.log" >> "t3.log"
    
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"description\":.\"\(.*\)\",.$/\n\1/gi; " "t3.log" >> "t5.log"
    
    for /f "usebackq tokens=* delims=*" %%G in ("t5.log") do ( set "desc-G=%%G" )
    
    set "description=%desc-L% (%desc-G%)"
    echo.%description%> "y1.log"
    
    %sw.TV%\sed "s/\\/~/g; s/²/\xB2/g; s/³/\xB3/g; s/º/\xBA/g; s/ª/\xAA/g; s/°/\xB0/g; s/©/\xA9/g; s/È/\xC8/g; s/à/\xE0/g; s/á/\xE1/g; s/â/\xE2/g; s/ã/\xE3/g; s/ä/\xE4/g; s/å/\xE5/g; s/æ/\xE6/g; s/ç/\xE7/g; s/è/\xE8/g; s/é/\xE9/g; s/ê/\xEA/g; s/ë/\xEB/g; s/ì/\xEC/g; s/í/\xED/g; s/î/\xEE/g; s/ï/\xEF/g; s/ð/\xF0/g; s/ñ/\xF1/g; s/ò/\xF2/g; s/ó/\xF3/g; s/ô/\xF4/g; s/õ/\xF5/g; s/ö/\xF6/g; s/÷/\xF7/g; s/ø/\xF8/g; s/ù/\xF9/g; s/ú/\xFA/g; s/û/\xFB/g; s/ü/\xFC/g; s/ý/\xFD/g; s/þ/\xFE/g; s/ÿ/\xFF/g; s/  / /g; " "y1.log" > "y2.log"
    
    for /f "usebackq tokens=* delims=*" %%Y in ("y2.log") do ( set "desc=%%Y" )
    
    
    %sw.TV%\sed "s/\&/+/g; /^.\"actors\":.\".*,.*\",.$/!d; " "d.log" > "u2.log"
    %sw.TV%\sed -e "2,$d" "u2.log" > "u3.log"
    %sw.TV%\sed "s/\\\x22/~/g; s/^.\"actors\":.\"\(.*\)\",.$/\1/gi; " "u3.log" > "u4.log"
    
    for /f "usebackq tokens=* delims=*" %%O in ("u4.log") do ( set "title-7=%%O" )
    
    set "actors=%title-7%"
    echo.%actors%> "z1.log"
    
    %sw.TV%\sed "s/:/./g; s/|/\xA6/g; s/</\xAB/g; s/>/\xBB/g; s/\\/~/g; s/\//~/g; s/?/^/g; s/\x22/''/g; s/\x2a/\xB0/g; s/²/\xB2/g; s/³/\xB3/g; s/º/\xBA/g; s/ª/\xAA/g; s/°/\xB0/g; s/©/\xA9/g; s/È/\xC8/g; s/à/\xE0/g; s/á/\xE1/g; s/â/\xE2/g; s/ã/\xE3/g; s/ä/\xE4/g; s/å/\xE5/g; s/æ/\xE6/g; s/ç/\xE7/g; s/è/\xE8/g; s/é/\xE9/g; s/ê/\xEA/g; s/ë/\xEB/g; s/ì/\xEC/g; s/í/\xED/g; s/î/\xEE/g; s/ï/\xEF/g; s/ð/\xF0/g; s/ñ/\xF1/g; s/ò/\xF2/g; s/ó/\xF3/g; s/ô/\xF4/g; s/õ/\xF5/g; s/ö/\xF6/g; s/÷/\xF7/g; s/ø/\xF8/g; s/ù/\xF9/g; s/ú/\xFA/g; s/û/\xFB/g; s/ü/\xFC/g; s/ý/\xFD/g; s/þ/\xFE/g; s/ÿ/\xFF/g; s/  / /g; " "z1.log" > "z2.log"
    
    for /f "usebackq tokens=* delims=*" %%Z in ("z2.log") do ( set "act=%%Z" )
    if "%act%"=="" ( set "act=?" )
    
    
    echo.>> "i.log"
    echo.description:>> "i.log"
    echo.-------------->> "i.log"
    echo.%desc%>> "i.log"
    
    echo.>> "i.log"
    echo.actors:>> "i.log"
    echo.-------------->> "i.log"
    echo.%act%>> "i.log"
    
    
    set "title-temp=%title-1% {©RAI-play-it}"
    echo.%title-temp%> "v.log"
    
    %sw.TV%\sed "s/:/./g; s/|/\xA6/g; s/</\xAB/g; s/>/\xBB/g; s/\\/~/g; s/\//~/g; s/?/^/g; s/\x22/''/g; s/\x2a/\xB0/g; s/²/\xB2/g; s/³/\xB3/g; s/º/\xBA/g; s/ª/\xAA/g; s/°/\xB0/g; s/©/\xA9/g; s/È/\xC8/g; s/à/\xE0/g; s/á/\xE1/g; s/â/\xE2/g; s/ã/\xE3/g; s/ä/\xE4/g; s/å/\xE5/g; s/æ/\xE6/g; s/ç/\xE7/g; s/è/\xE8/g; s/é/\xE9/g; s/ê/\xEA/g; s/ë/\xEB/g; s/ì/\xEC/g; s/í/\xED/g; s/î/\xEE/g; s/ï/\xEF/g; s/ð/\xF0/g; s/ñ/\xF1/g; s/ò/\xF2/g; s/ó/\xF3/g; s/ô/\xF4/g; s/õ/\xF5/g; s/ö/\xF6/g; s/÷/\xF7/g; s/ø/\xF8/g; s/ù/\xF9/g; s/ú/\xFA/g; s/û/\xFB/g; s/ü/\xFC/g; s/ý/\xFD/g; s/þ/\xFE/g; s/ÿ/\xFF/g; s/  / /g; " "v.log" > "w.log"
    
    for /f "usebackq tokens=* delims=*" %%V in ("w.log") do ( set "save=%%V" )
    
    echo.>> "i.log"
    echo.title video: {©R A I-P L A Y-I T}>> "i.log"
    echo.-------------->> "i.log"
    echo.^> ^> ^> ^>%save%^< ^< ^< ^<>> "i.log"
    
    echo.>> "i.log"
    echo.save as:>> "i.log"
    echo.-------------->> "i.log"
    echo.%direct%\%save%.mp4>> "i.log"
    
    echo.>> "i.log"
    
    echo. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@>> "i.log"
    echo.   - - s e a r c h n v a u t h - - .m3u8 + .mpd =^> %date% %time%>> "i.log"
    echo. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@>> "i.log"
    echo.Script G.T.X.R. Version 2.2.3>> "i.log"
    
    
    :end
    
    set "info=.\i-n-f-o ''%save%''"
    if exist "%info%" del /F /Q "%info%\*"
    if not exist "%info%" mkdir "%info%"
    
    if exist "%info%\new.data.*p.txt" del /F /Q "%info%\new.data.*p.txt"
    if exist "%info%\new.data.expired.txt" del /F /Q "%info%\new.data.expired.txt"
    
    
    if "%res%"=="" ( set "res=expired" )
    
    %sw.TV%\sed "s/©/\xA9/g; s/\^//g; " "i.log" >> "x.log"
    
    if exist "x.log" copy /Y "x.log" "%info%\new.data.%res%.txt">nul
    
    if "%textinfo%"=="on" ( if exist "%info%\new.data.%res%.txt" start "" "%info%\new.data.%res%.txt" )
    
    for /f "usebackq tokens=* delims=*" %%B in ("p.log") do ( set "subt=%%B" )
    %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --referer=%REF% --header="X-Forwarded-For:%IP%" "%subt%" -q --directory-prefix="%info%"
    
    
    if "%res%"=="0000" ( if not "%debug%"=="on" ( if exist ".\*.log" del /F /Q ".\*.log" ) && goto error )
    if "%XML%"=="" (goto skip.info)
    
    rem :: ================== ::
      if not "%raw%"=="on" (goto skip.info)
    rem :: ================== ::
    
    echo.[InternetShortcut]> "%info%\%save%.url"
    echo.URL=%url%>> "%info%\%save%.url"
    echo.IDList=>> "%info%\%save%.url"
    echo.HotKey=^0>> "%info%\%save%.url"
    echo.IconFile=>> "%info%\%save%.url"
    echo.IconIndex=^0>> "%info%\%save%.url"
    echo.>> "%info%\%save%.url"
    
    for /f "usebackq tokens=* delims=*" %%N in ("b.log") do ( %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --referer=%REF% --header="X-Forwarded-For:%IP%" %%N -q -P "%info%" )
    
    copy /Y ".\d.log" "%info%\s e p a r a t e (CRLF).txt">nul
    
    %sw.TV%\sed "s/\s.video.:\s{\s\s.content_url.:\s.https:\/\/mediapolisvod\.rai\.it\/relinker\/relinkerServlet\.htm?cont=\(.*\)eeqqEEqual.*$/\1/gi; s/eeqqEEqual//; " "e.log" > "a.log"
    
    for /f "usebackq tokens=* delims=*" %%H in ("a.log") do ( set "high=%%H" )
    
    %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --header="X-Forwarded-For:%IP%" %XML% -q -O "%info%\%high%.xml"
    
    if "%type%"=="mpd" ( copy /Y ".\l.log" "%info%\Media Presentation Description.mpd">nul )
    if "%type%"=="m3u8" ( copy /Y ".\l.log" "%info%\Multimedia MP3 URL (Version 8).m3u8">nul )
    
    for /f "usebackq tokens=* delims=*" %%S in ("p.log") do ( %sw.TV%\wget -c --no-check-certificate -U "%Agent%" --referer=%REF% --header="X-Forwarded-For:%IP%" %%S -q -P "%info%" )
    
    rem :: ================== ::
               :skip.info
    rem :: ================== ::
    
    set "m3u8.or.mpd=%mpd%"
    set "m3u8.or.mpd_=%mpd_%"
    set "title=%save%"
    
    if not "%debug%"=="on" ( if exist ".\*.log" del /F /Q ".\*.log" )
    
    ::------------------------------------------
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\KEYS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.......................................................................
    echo.  %key%
    echo.......................................................................
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\KEYS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\ description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.......................................................................
    echo.  %description%
    echo.......................................................................
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\ description\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\actors \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.......................................................................
    echo.  %actors%
    echo.......................................................................
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\actors \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\ URL\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.......................................................................
    echo.  %url%
    echo.......................................................................
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\ URL\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    ::------------------------------------------
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\TITLE\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.    %title%
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\TITLE\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    ::------------------------------------------
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\M3U8 or MPD\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.  %m3u8.or.mpd_%
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\M3U8 or MPD\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    echo.
    set "m3u8.or.mpd=%m3u8.or.mpd: =%"
    set "key=%key: =%"
    ::------------------------------------------
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\N_m3u8DL-RE\\\\\\\\ parameters\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.    -M mp4 --key "%%key%%" "%%m3u8.or.mpd%%" -sv best -sa %Audio% -ss all --check-segments-count false --tmp-dir "%direct%" --save-dir "%direct%" --save-name "%%title%%" -H "User-Agent: %Agent%" -H "Referer: %REF%" -H "X-Forwarded-For: %IP%"
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\ parameters\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    echo.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    ::------------------------------------------
    
    if "%save%"=="" ( goto error )
    echo.
    
    echo.   ^> ^> ^> ^>  d o w n l o a d i n g        m e t a d a t a    a n d    p a u s e/ exit
    if "%recording%"=="on" (goto rec)
    
    rem pause
    exit
    :rec
    
    echo.
    echo.:: ========================================================== ::
    echo.  - r e c o r d i n g s t r e a m - Vers: 2.2.3 .m3u8 + .mpd -
    echo.:: ========================================================== ::
    
    echo.
    %sw.TV%\N_m3u8DL-RE -M mp4 --key "%key%" "%m3u8.or.mpd%" -sv best -sa %Audio% -ss all  --check-segments-count false --tmp-dir "%direct%" --save-dir "%direct%" --save-name "%title%" -H "User-Agent: %Agent%" -H "Referer: %REF%" -H "X-Forwarded-For: %IP%"
    
    echo. END - r e c o r d i n g s t r e a m - .m3u8 + .mpd = %date% %time%
    if exist "%direct%" start "" "%direct%"
    
    if "%pause%"=="on" ( pause )
    :error
    Last edited by G.T.X.R; 4th Mar 2025 at 08:32.
    Quote Quote  
  2. Member G.T.X.R's Avatar
    Join Date
    Jan 2025
    Location
    Europe
    Search Comp PM
    Updated information in 1st post, since this guide is intended for beginners, and some concepts were not clear.

    Updated script from 2.2.2 to vers. 2.2.3 fixed two bugs: "&" in video titles as well as errors on webpage would break the program, now shows "random res" wording if resolution is wrong without stop to work. Accented characters in languages ​​other than Italian have also been corrected.

    The three *.cmd (command file for windows) are also available as zip, here. Any comments, suggestions or questions are welcome!
    Quote Quote  
  3. Member G.T.X.R's Avatar
    Join Date
    Jan 2025
    Location
    Europe
    Search Comp PM
    Version 2.2.4 can be found here.

    Changelog

    °Temporary files have been moved to the %temp% directory, but still remain in the current directory if the script is in debug mode.

    °Bookmarks in the current directory are now automatically moved to "a-d-d-r-e-s-s" after the download is complete.
    Quote Quote  
  4. Feels Good Man 2nHxWW6GkN1l916N3ayz8HQoi's Avatar
    Join Date
    Jan 2024
    Location
    Pepe Island
    Search Comp PM
    Thanks for sharing
    Always nice to see people sharing their works
    --[----->+<]>.++++++++++++.---.--------.
    [*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
    Quote Quote  
  5. Member G.T.X.R's Avatar
    Join Date
    Jan 2025
    Location
    Europe
    Search Comp PM
    Experimental version 2.2.5, here.

    Now the script fills in the form of the chosen server (pssh, license url, headers) and shows the key. Tested on Get Widevine Keys not tested on CDRM-Project because it is down.

    If an error appears, such as insufficient disk space, it automatically cancels the partial download, and only in case of success it opens the directory and moves the bookmark to "a-d-d-r-e-s-s".

    If the name is already present, it deletes the file because it is assumed that it is a residue of a previous failed download.

    Note: setting raw=on, the start is slow; setting raw=off, the start is very fast.
    Note 2: Please wait 5 seconds to see the form fill itself...

    EDIT. Sorry, i uploaded wrong file, delete that and refresh the page to get the right one!
    Last edited by G.T.X.R; 24th Mar 2025 at 00:57.
    Quote Quote  
  6. Member G.T.X.R's Avatar
    Join Date
    Jan 2025
    Location
    Europe
    Search Comp PM
    //// Version 2.2.6 is here! ////

    Fixed bug "special character ’ (U+2019) if contained in video title blocks script".

    Fixed bug "if raw is set to off not all subtitles are saved".

    Now the key is found automatically, no more copying and pasting of data (the form fills itself in, shows the result and stores it in the text file _source.txt, ready to be used by '*record*.cmd').

    Detects the content type, if it is a TV series it adds S1-E1... to the file name.

    Verified that it works with both servers (Get Widevine Keys and CDRM-Project).

    ° How to use version 2.2.6 ?

    - Drag the bookmark of the raiplay page with the video, into the folder where the three scripts (*.cmd) are located directly from the browser.

    - if there is no drm, then click on *record*.cmd

    - if there is drm click first on *challenge*.cmd and wait about 15 seconds. Once you have obtained the key and it is automatically saved (all windows will close by themselves), click on *record*.cmd

    - '*info-only*.cmd' is optional, it is only used to get more information about the viewed content.

    To do:
    - turn the script into a mass downloader, maybe
    - figure out why this link is not hooked
    - merge the two main scripts, so that it decides what to do on its own

    P.S.: Bookmark must contain link to the page with video, not to the page with description only. If it does not contain link to the page with video, press f5, then recreate bookmark.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!